<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<composite:interface>
	<composite:attribute name="title" />
</composite:interface>

<composite:implementation>
	<h2>Release communities:</h2>
	<h:form id="releaseCommunities">
		<p:dataTable id="cmList" value="#{communityBean.notReleasedCommunities}" var="community">
			<p:column headerText="ID">			
				#{community.ID}
			</p:column>
			<p:column headerText="Details">						
				<h:link id="communityDetails" value="#{community.name}" outcome="communitydetails" >
					<f:param name="id" value="#{community.ID}"/>				
				</h:link>			
			</p:column>
			<p:column headerText="Description">			
				#{community.description}
			</p:column>
			<p:column headerText="Topic">			
				#{community.topic}
			</p:column>	
			<p:column headerText="Release community">	
				<p:commandButton id="releaseCommunity" value="Release Community" actionListener="#{communityBean.releaseCommunity(community)}" icon="ui-icon-disk" ajax="false" rendered="true"/>		
			</p:column>
				
		</p:dataTable>	
	</h:form>
	
</composite:implementation>
</html>